<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
//    var arr1 = [];
//    var j = 0;
//    for(var i=1;i<=10;i++){
//        if(i%2!==0){
//            arr1[j] = i;
//            j++;
//        }
//    }
//    console.log(arr1);


//var arr1 = [];
//for(var i=1;i<=10;i++){
//    if(i%2!==0){
//        arr1[arr1.length] = i;
//    }
//}
//console.log(arr1);



    var arr2 = [];
    for(var i=1;i<=10;i++) {
        if(i%3===0){
            arr2[arr2.length] = i;
        }
    }
    console.log(arr2);




</script>
</body>
</html>